<%@ include file="/common/taglibs.jsp"%>
<%@ page language="java" pageEncoding="utf8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
		<title></title>
		<link rel="stylesheet" href="<c:url value="/css/shopadmin.css"/>"
			type="text/css" />
		<link rel="stylesheet"
			href="<c:url value='/scripts/themes/base/jquery.ui.all.css'/>"
			type="text/css" />
	</head>
	<body class="single-page">

		<form method="post" action="od_order_ship_print.html"
			id="dly_printer_form">
			<input type="hidden" name="orderId" value="${orders.orderId}" />
			<div id="x-order_tableform" class="tableform">
				<table width="100%" cellspacing="0" cellpadding="0" border="0">
					<tbody>
						<tr>
							<td>
								<h4>
									收货地址信息
								</h4>
							</td>
						</tr>
					</tbody>
				</table>
				<div class="division">
					<table width="100%" cellspacing="0" cellpadding="0" border="0">
						<tbody>
							<tr>
								<th>
									姓名：
								</th>
								<td colspan="3">
									 ${orders.shipName }
								</td>
							</tr>
							<tr>
								<th>
									省区：
								</th>
								<td>${orders.shipArea}
								</td>
								<th>
									邮编：
								</th>
								<td>${orders.shipZip}

								</td>
							</tr>
							<tr>
								<th>
									地址：
								</th>
								<td colspan="3">${orders.shipAddr}
								</td>
							</tr>
							<tr>
								<th>
									手机：
								</th>
								<td>${orders.shipMobile}
								</td>
								<th>
									电话：
								</th>
								<td>${orders.shipTel}
								</td>
							</tr>
							<tr>
								<th>
									备注：
								</th>
								<td colspan="3">${orders.description}
								</td>
							</tr>
						</tbody>
					</table>
				</div>
				<h4>
					发货地址信息
				</h4>
				<span style="padding-left: 10px;">发货点选择:<select onchange="chooseCenter(this.value)"
						id="dly_center_select" name="dly_center">
						<c:forEach items="${orderDeliveryCenters}" var="center" varStatus="index">
						<option value="${center.deliveryCenterId}"  <c:if test="${center.defaultFlag }"> selected="selected" </c:if> >
							${center.centerName}
						</option>
						</c:forEach>
					</select> </span>
				<div  class="division">
					<table id="dly_center_row" cellspacing="0" cellpadding="0" border="0">
						
							<tr>
								<th>
									姓名：
								</th>
								<td id="center_username">
									
								</td>
								<th>
									地区：
								</th>
								<td id="center_area">
									
								</td>
							</tr>
							<tr>
								<th>
									邮编：
								</th>
								<td id="center_zip">
								</td>
								<th>
									地址：
								</th>
								<td id="center_addr">
									
								</td>
							</tr>
							<tr>
								<th>
									手机：
								</th>
								<td id="center_mobile">
									
								</td>
								<th>
									电话：
								</th>
								<td id="center_tel">
								</td>
							</tr>
						
					</table>
				</div>
			</div>
		</form>


		<script type="text/javascript"
			src="<c:url value='/scripts/jquery-1.4.2.js'/>"></script>

		<script type="text/javascript">
	function autoHeightAndWeight() {
		$("#main").height($("body").height() - $("#single-page-tbar").height());

	}

	autoHeightAndWeight();
	var centers = [];
	<c:forEach items="${orderDeliveryCenters}" var="center" varStatus="index">
	     centers[${center.deliveryCenterId}] = new Array();
		 centers[${center.deliveryCenterId}][0] ='${center.centerUname}';		
		 centers[${center.deliveryCenterId}][1] ='${center.centerRegion}';	
		 centers[${center.deliveryCenterId}][2] ='${center.centerZip}';	
		 centers[${center.deliveryCenterId}][3] ='${center.centerAddress}';	
		 centers[${center.deliveryCenterId}][4] ='${center.centerCellphone}';	
		 centers[${center.deliveryCenterId}][5] ='${center.centerPhone}';	
		 <c:if test="${center.defaultFlag }">chooseCenter(${center.deliveryCenterId});</c:if>			
	</c:forEach>
	
	function chooseCenter(centerId){
		$('#center_username').html('') ;$('#center_username').html(centers[centerId][0]);
		$('#center_area').html('') ;$('#center_area').html(centers[centerId][1]);
		$('#center_zip').html('') ;$('#center_zip').html(centers[centerId][2]);
		$('#center_addr').html('') ;$('#center_addr').html(centers[centerId][3]);
		$('#center_mobile').html('') ;$('#center_mobile').html(centers[centerId][4]);
		$('#center_tel').html('') ;$('#center_tel').html(centers[centerId][5]);
	}
	
	
</script>

	</body>
</html>